This patch prevents writing empty configuration items to the domain's
sexpr configuration file. Without the empty items, the sexpr is
parsed properly when xend is started.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
for key in XENAPI_PLATFORM_CFG:
val = sxp.child_value(image_sxp, key, None)
- if val is not None:
+ if val is not None and val != '':
self['platform'][key] = val
notes = sxp.children(image_sxp, 'notes')
for key in XENAPI_PLATFORM_CFG:
val = sxp.child_value(image_sxp, key, None)
- if val is not None:
+ if val is not None and val != '':
self['platform'][key] = val
notes = sxp.children(image_sxp, 'notes')